package gat.common.util;

import com.bitsun.core.common.util.BizCenterNoWorker;
import com.bitsun.core.common.util.SpringUtil;

public class NoUtil {

    /**
     * 根据订单前缀生成订单号
     *
     * @return
     */
    public static String getNo(String prefix) {
        BizCenterNoWorker bizCenterNoWorker = SpringUtil.getBean(BizCenterNoWorker.class);
        return bizCenterNoWorker.nextCode(prefix);
    }

    /**
     * 根据订单前缀生成订单号
     *
     * @return
     */
    public static String getSecondsNo(String prefix) {
        BizCenterNoWorker bizCenterNoWorker = SpringUtil.getBean(BizCenterNoWorker.class);
        return bizCenterNoWorker.nextSecondsCode(prefix);
    }


}
